<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改液氮出库')" />
	<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-ncYedanLog-edit" th:object="${ncYedanLog}">
		<input id="yedanLogId" name="yedanLogId" th:field="*{yedanLogId}"  type="hidden">
		<div class="form-group" hidden="hidden">
			<label class="col-sm-3 control-label">液氮id：</label>
			<div class="col-sm-8">
				<input id="yedanId" name="yedanId" th:field="*{yedanId}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">出库时间：</label>
			<div class="col-sm-8">
				<input id="createTime" data-type="datetime" data-format="yyyy-MM-dd HH:mm:ss" name="createTime" required
					   th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd hh:mm:ss')}" class="form-control"
					   type="text" th:class="time-input">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">库存(升)：</label>
			<div class="col-sm-8">
				<input id="stockAmout" name="stockAmout" th:field="*{stockAmout}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">出库数量(升)：</label>
			<div class="col-sm-8">
				<input id="outputAmount" name="outputAmount" th:field="*{outputAmount}" class="form-control" type="text">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">领取购人：</label>
			<div class="col-sm-8">
				<select id="receiver" name="receiver" class="form-control select2-multiple" >
					<option th:each="user:${users}" th:value="${user.loginName}" th:text="${user.loginName}" th:field="*{receiver}"> </option>
				</select>
			</div>

		</div>
		<!--	<div class="form-group">
				<label class="col-sm-3 control-label">经手人：</label>
				<div class="col-sm-8">
					<select id="createBy" name="createBy" class="form-control select2-multiple" multiple>
						<option th:each="user:${users}" th:value="${user.loginName}" th:text="${user.loginName}" th:field="*{createBy}"></option>
					</select>
				</div>
			</div>-->
		<div class="form-group">
			<label class="col-sm-3 control-label">备注：</label>
			<div class="col-sm-8">
				<textarea rows="4" name="remark" th:field="*{remark}" class="form-control" type="text"></textarea>
			</div>
		</div>
	</form>
</div>
<div th:include="include::footer"></div>
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
    var prefix = ctx + "system/ncYedanLog";
    $("#form-ncYedanLog-edit").validate({
        rules: {
            outputAmount: {
                required: true,
                digits: true
            },
            stockAmout: {
                required: true,
                digits: true
            }

        },
        messages: {
            outputAmount: "出库数必须为正整数",
            stockAmout: "库存数必须为正整数"
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-ncYedanLog-edit').serialize());
        }
    }
</script>
</body>
</html>
